#region

using System;
using System.ComponentModel.DataAnnotations.Schema;

#endregion

namespace CuongHanh.Models
{
    [Table("tbl_Category")]
    public class Category : BaseClass
    {
        public Category()
        {
        }

        public Category(int branchId)
        {
            BranchId = branchId;
        }

        public Category(Category model)
        {
            NameVi = model.NameVi;
            NameEn = model.NameEn;
            NameZh = model.NameZh;
            BranchId = model.BranchId;
            Code = model.Code;
            No = model.No;
            Invisible = model.Invisible;
            Inactive = false;
            LastModified = DateTime.Now;
        }

        public int BranchId { get; set; }

        public string Code { get; set; }

        public string NameVi { get; set; }

        public string NameEn { get; set; }

        public string NameZh { get; set; }

        public int No { get; set; }

        public bool Invisible { get; set; }

        public void UpdateInfoFrom(Category model)
        {
            NameVi = model.NameVi;
            NameEn = model.NameEn;
            NameZh = model.NameZh;
            BranchId = model.BranchId;
            Code = model.Code;
            No = model.No;
            Invisible = model.Invisible;
            LastModified = DateTime.Now;
        }
    }
}
